<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ page import="java.util.*" %>

<jsp:useBean id="formHandler" class="se2.LoginBean" scope="request"/>
<jsp:useBean id="userData" class="se2.UserData" scope="session"/>
<jsp:setProperty name="formHandler" property="*"/>

<c:choose>
<c:when test="${formHandler.validate == 1}">
<%
userData.setUsername(formHandler.getUsername());
%>
<jsp:forward page="administratorMenu.jsp"/>
</c:when>
<c:otherwise>
<jsp:forward page="index.jsp?error=Invalid+Login"/>
</c:otherwise>
</c:choose>
